@import "../../../styles/variable";

.overlay{
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: $fy-popup-zIndex - 1;
  position: fixed;
  transition: all 300ms;
  background: rgba(0, 0, 0, 0.4);
}

.popup {
  z-index: $fy-popup-zIndex;
  position: fixed;
  //max-height: 100%;
  animation: ease both;
  transition: transform 0.3s;
  background-color: #fff;
  transition-property: transform;
  transition-timing-function: ease;
}

.scale{
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  transition-property: opacity, transform;
  &.round {
    border-radius: 20px;
  }

  &.enter {
    transform: translate3d(-50%, -50%, 0) scale(0);
    opacity: 0;
  }
}

.fade{
  transition-property: opacity, display;

  &.enter {
    opacity: 0;
    display: none;
  }
}

.top{
  top: 0;
  left: 0;
  width: 100%;
  &.round {
    border-radius: 0 0 20px 20px;
  }

  &.enter {
    transform: translate3d(0, -100%, 0);
  }
}

.bottom{
  left: 0;
  width: 100%;
  bottom: 0;

  &.round {
    border-radius: 20px 20px 0 0;
  }

  &.enter {
    transform: translate3d(0, 100%, 0);
  }
}



@keyframes popupInUp {
  0%,60%,75%,90%,to {
    animation-timing-function: cubic-bezier(.215,.61,.355,1);
  }

  0% {
    opacity: 0;
    transform: translate3d(-50%, 750vh, 0);
  }

  60% {
    opacity: 1;
    transform: translate3d(-50%, calc(-50% - 20px), 0);
  }

  75% {
    transform: translate3d(-50%, calc(-50% + 10px), 0);
  }

  90% {
    transform: translate3d(-50%, calc(-50% - 5px), 0);
  }

  to {
    transform: translate3d(-50%, -50%, 0);
  }
}


.modal{
  top: 50%;
  left: 50%;
  width: 84vw;
  display: none;
  transform: translate3d(-50%, -50%, 0);

  &.enter {
    display: flex;
    animation: popupInUp 1s both;
  }
}
